<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px;">
  <t:datagrid pageSize="100" name="businessOrderList" checkbox="false" pagination="true" fitColumns="false" title="稿费订单表" sortName="createDate" actionUrl="businessOrderController.do?datagrid&orgCode=${orgCode}&orgType=${orgType}" idField="id" fit="true" queryMode="group">
      <t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
      <t:dgCol title="序号" field="number"  frozenColumn="true" queryMode="single" width="60"></t:dgCol>
      <t:dgCol title="频道名称" field="sysOrgCode"  hidden="true" queryMode="single" width="60"></t:dgCol>
      <t:dgCol title="栏目名称" field="sysCompanyCode" hidden="true" queryMode="single" width="60"></t:dgCol>
      <t:dgCol title="姓名" field="userName" query="false"  frozenColumn="true" queryMode="single" width="60"></t:dgCol>
      <t:dgCol title="工作类别" field="typeremark"  frozenColumn="true" queryMode="single" width="120"></t:dgCol>
      <t:dgCol title="身份证号" field="userCard"  frozenColumn="true" query="false" queryMode="single" width="126"></t:dgCol>
      <t:dgCol title="录入金额" field="cost"  frozenColumn="true" query="false" queryMode="group" width="70" extendParams="styler:fmtype"></t:dgCol>
      <t:dgCol title="审核金额" field="ucost"  frozenColumn="true" queryMode="single" width="70" extendParams="styler:fmtype"></t:dgCol>
      <t:dgCol title="录入等级" field="columnLev" frozenColumn="true"  queryMode="single" width="70" extendParams="styler:fmtype"></t:dgCol>
      <t:dgCol title="审核等级" field="ucolumnLev" frozenColumn="true"  queryMode="single" width="70" extendParams="styler:fmtype"></t:dgCol>
      <t:dgCol title="汇款地址/账号" field="costAddr" queryMode="single" width="120"></t:dgCol>

      <t:dgCol title="发放方式" field="costPutout" queryMode="single" width="70"></t:dgCol>
      <t:dgCol title="稿件题目(内容)" field="contribution" queryMode="single" width="120"></t:dgCol>
      <t:dgCol title="播出时间" field="columnTime" queryMode="single" width="80"></t:dgCol>
      <t:dgCol title="字数/时长/版面" field="columnNum" queryMode="single" width="100"></t:dgCol>
      <t:dgCol title="费用类型" field="costType" query="false" queryMode="single" width="80"></t:dgCol>
      <t:dgCol title="制单人" field="createName" queryMode="single" width="60"></t:dgCol>

      <t:dgCol title="编辑" field="orderEdit" queryMode="single" width="60"></t:dgCol>
      <t:dgCol title="制片人" field="producer" queryMode="single" width="60"></t:dgCol>
      <t:dgCol title="部门主任" field="departManager" queryMode="single" width="60"></t:dgCol>
      <t:dgCol title="总监" field="producerManager" queryMode="single" width="120"></t:dgCol>
      <t:dgCol title="录入时间" field="createTime" queryMode="single" width="80"></t:dgCol>
      <t:dgCol title="创建日期" field="createDate"  formatter="yyyy-MM-dd" hidden="false" value1="${startdt}" value2="${enddt}" query="true" queryMode="group"
               width="120"></t:dgCol>
      <t:dgCol title="备注" field="comments" queryMode="single" width="120"></t:dgCol>

      <t:dgCol title="审核记录" field="uLog" queryMode="single" width="600"></t:dgCol>

      <t:dgCol title="remark" field="remark" hidden="true" queryMode="single" width="120"></t:dgCol>
      <t:dgCol title="颜色" field="umodifyflag" hidden="true" queryMode="single" width="120"></t:dgCol>
      <t:dgCol title="备用1" field="ad1" hidden="true" queryMode="single" width="120"></t:dgCol>
      <t:dgCol title="备用2" field="ad2" hidden="true" queryMode="single" width="120"></t:dgCol>
      <t:dgCol title="备用3" field="ad3" hidden="true" queryMode="single" width="120"></t:dgCol>
      <t:dgCol title="备用4" field="ad4" hidden="true" queryMode="single" width="120"></t:dgCol>
      <t:dgCol title="创建人登录名称" field="createBy" hidden="true" queryMode="single" width="120"></t:dgCol>
       <t:dgCol title="更新人名称" field="updateName" hidden="true" queryMode="single" width="120"></t:dgCol>
      <t:dgCol title="更新人登录名称" field="updateBy" hidden="true" queryMode="single" width="120"></t:dgCol>
      <t:dgCol title="更新日期" field="updateDate" formatter="yyyy-MM-dd" hidden="true" queryMode="single"
               width="120"></t:dgCol>

      <%--<t:dgCol title="操作" field="opt" width="100"></t:dgCol>--%>

   <t:dgDelOpt title="删除" url="businessOrderController.do?doDel&id={id}" urlclass="ace_button"  urlfont="fa-trash-o"/>
   <t:dgToolBar title="录入" buttons="${buttons}" operationCode="lr" icon="icon-add" url="businessOrderController.do?goAdd&orgCode=${orgCode}&orgType=${orgType}&orgParent=${orgParent}" width="970" height="450" funname="add"></t:dgToolBar>
      <t:dgToolBar title="修改" buttons="${buttons}" operationCode="lrcx" icon="icon-search" url="businessOrderController.do?goAddList&orgCode=${orgCode}&orgType=${orgType}&orgParent=${orgParent}" width="970" height="500" funname="toaddList"></t:dgToolBar>
      <t:dgToolBar title="汇总图表" buttons="${buttons}" operationCode="hztb" icon="icon-search" url="businessOrderController.do?goChart&orgCode=${orgCode}&orgType=${orgType}&orgParent=${orgParent}" width="770" height="500" funname="goChart"></t:dgToolBar>

      <%--<t:dgToolBar title="编辑" icon="icon-edit" url="businessOrderController.do?goUpdate" funname="update"></t:dgToolBar>
   --%><%--<t:dgToolBar title="批量删除"  icon="icon-remove" url="businessOrderController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar>--%>
  <%-- <t:dgToolBar title="查看" icon="icon-search" url="businessOrderController.do?goUpdate" funname="detail"></t:dgToolBar>
  --%> <t:dgToolBar title="审核" buttons="${buttons}" operationCode="sh" icon="icon-put" funname="tocheck"></t:dgToolBar>

   <t:dgToolBar title="汇总导出" buttons="${buttons}" operationCode="hzdc" icon="icon-put" funname="toexport"></t:dgToolBar>
   <t:dgToolBar title="纪检查询" buttons="${buttons}"  operationCode="jjcx" icon="icon-put" funname="totopcheck"></t:dgToolBar>

   <%--  <t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar>--%>
 <%-- <t:dgToolBar title="导出" buttons="${buttons}" operationCode="dc" icon="icon-putout" funname="ExportXls"></t:dgToolBar>--%>
      <t:dgToolBar title="稿费领用人" buttons="${buttons}" operationCode="yhxx" icon="icon-search" url="businessUserMapController.do?list" funname="touser"></t:dgToolBar>

      <%-- <t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar>--%>
  </t:datagrid>
      <%--<div id="businessOrderListtb" style="padding: 3px; height: 50px">
          <div align="right" class="searchColums">
              <label for="createDate" class="col-sm-2 control-label">时间: </label>
              <input type="text" name="startdt" style="width: 100px" class="Wdate" onclick="WdatePicker()" value="${startdt}">
              ~
              <input type="text" name="enddt" style="width: 100px" class="Wdate" onclick="WdatePicker()" value="${enddt}">
              <a href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="searchoBusiness();">查询</a>
          </div>
      </div>--%>
  </div>
 </div>


<script type="text/javascript" src="plug-in/echart/echarts.js"></script>

 <script type="text/javascript">
 $(document).ready(function(){
     /*$.ajax({
         url:"businessOrderController.do?chart&orgCode=${orgCode}&orgType=${orgType}",
         type:"GET",
         dataType:"JSON",
         async: false,
         success:function(data){
             var echartsWarp= document.getElementById('main');
             var resizeWorldMapContainer = function () {
                 echartsWarp.style.width = window.innerWidth+'px';
                 echartsWarp.style.height = '200px';
             };
             resizeWorldMapContainer ();
             var myChart = echarts.init(echartsWarp);
             myChart.setOption(data);
         }
     });*/
 });
 function searchoBusiness() {
     businessOrderListsearch();
 }
 function tocheck(){
     createdetailwindow("审核管理","businessOrderController.do?tocheck&orgCode=${orgCode}&orgType=${orgType}",1000,560);
 }
function touser(){
    createdetailwindow("用户信息维护","businessUserMapController.do?list",800,560);
}
 function toexport(){
     var stdt = $("input[name$='createDate_begin']" ).val();
     var eddt = $("input[name$='createDate_end']" ).val();
     var url="&detailflag=2&startdt="+stdt+"&enddt="+eddt;
     createdetailwindow("汇总导出","businessOrderController.do?toexport&orgCode=${orgCode}&orgType=${orgType}"+url,1000,560);
 }
 function toaddList(){
     var stdt = $("input[name='createDate_begin']" ).val();
     var eddt = $("input[name$='createDate_end']" ).val();
     var url="&startdt="+stdt+"&enddt="+eddt;
     createdetailwindow("录入查询","businessOrderController.do?goAddList&orgCode=${orgCode}&orgType=${orgType}"+url,1000,560);
 }
 function goChart(){
     var stdt = $("input[name='createDate_begin']" ).val();
     var eddt = $("input[name$='createDate_end']" ).val();
     var url="&startdt="+stdt+"&enddt="+eddt;
     createdetailwindow("汇总图表","businessOrderController.do?goChart&orgCode=${orgCode}&orgType=${orgType}"+url,1000,560);
 }

 function totopcheck(){
     var stdt = $("input[name$='createDate_begin']" ).val();
     var eddt = $("input[name$='createDate_end']" ).val();
     var url="&detailflag=2&startdt="+stdt+"&enddt="+eddt;
     createdetailwindow("纪检查询","businessOrderController.do?totopcheck&orgCode=${orgCode}&orgType=${orgType}"+url,1000,560);
 }
 function createdetailwindow(title, addurl,width,height) {
     width = width?width:700;
     height = height?height:400;
     if(width=="100%" || height=="100%"){
         width = window.top.document.body.offsetWidth;
         height =window.top.document.body.offsetHeight-100;
     }
     if(typeof(windowapi) == 'undefined'){
         $.dialog({
             content: 'url:'+addurl,
             zIndex: getzIndex(),
             lock : true,
             width:width,
             height: height,
             title:title,
             opacity : 0.3,
             cache:false,
             okVal: $.i18n.prop('dialog.submit'),
             cancelVal: $.i18n.prop('dialog.close'),
             cancel:function(){
                 businessOrderListsearch();
             },
         });
     }else{

         W.$.dialog({
             content: 'url:'+addurl,
             zIndex: getzIndex(),
             lock : true,
             width:width,
             height: height,
             parent:windowapi,
             title:title,
             opacity : 0.3,
             cache:false,
             okVal: $.i18n.prop('dialog.submit'),
             cancelVal: $.i18n.prop('dialog.close'),
             cancel:function(){
                 businessOrderListsearch();
             },
         });

     }

 }
 function fmtype(val,row,index){
     //可添加更多CSS样式
     var color = 'background:#99FF33;color:#353030';
     if (row.umodifyflag =='1') {
         return color
     }
 }
 //导入
function ImportXls() {
	openuploadwin('Excel导入', 'businessOrderController.do?upload', "businessOrderList");
}

//导出
function ExportXls() {
    var stdt = $("input[name$='createDate_begin']" ).val();
    var eddt = $("input[name$='createDate_end']" ).val();
    var url="&startdt="+stdt+"&enddt="+eddt;
	JeecgExcelExport("businessOrderController.do?exportXls"+url,"businessOrderList");
}

//模板下载
function ExportXlsByT() {
	JeecgExcelExport("businessOrderController.do?exportXlsByT","businessOrderList");
}
 </script>
